Parallel apply processing in data replication with preservation of transaction integrity and source ordering of dependent updates

ABSTRACT

A computer readable medium encoded with a computer program for handling transaction messages in asynchronous data replication in a database system is disclosed. The computer program provides a high speed parallel apply of transactional changes to a target node such that the parallel nature of the application of changes does not compromise the integrity of the data. The computer program detects, tracks, and handles dependencies between transaction messages to be applied to the target node. If a transaction message has a dependency on one or more preceding transaction messages whose applications have not yet completed, that transaction message is held until the application completes. In addition, the computer program requires significantly less overhead than conventional approaches.

CROSS-REFERENCE TO RELATED APPLICATIONS

Under 35 USC §120, this application is a Continuation Application of andclaims the benefit of priority to U.S. patent application Ser. No.10/789,775, filed Feb. 27, 2004, this application is also related topending U.S. patent application Ser. No. 11/771,801, filed Jun. 29,2007, all of which is incorporated herein by reference.

FIELD OF THE INVENTION

The present invention relates to the maintenance of multiple copies oftabular data, and more particularly to providing parallelized apply ofasynchronously replicated transactional changes to a target database.

BACKGROUND OF THE INVENTION

In a relational database management system, data is stored in amultiplicity of tables having a multiplicity of rows (records), the rowshaving a multiplicity of columns (fields). A subset of the columns aredesignated as key columns and the combination of values of the keycolumns of the rows of a single table must be distinct. It is frequentlydesired to maintain copies (replicas) of a first table residing in afirst database of the relational variety in one or more other databasesof the relational variety. Furthermore, it is desired that changes(inserts, deletes, and updates) to rows of the table in the firstdatabase be copied (replicated) to the table copies residing in theother databases. Additionally, it is sometimes desired that the changesmade to any of the table copies residing in any of the severalrelational databases be copied (replicated) to all the other tablecopies.

The propagation of changes made to one copy of the table may besynchronous or asynchronous to the original change. Synchronouspropagation makes changes at all copies as part of the same transaction(unit of work) that initiates the original changes. Asynchronouspropagation copies the original changes to the other table copies inseparate transactions, subsequent to the completion of the transactioninitiating the original changes. Synchronous change propagation requiresthat the database management systems maintaining all (or most) copies beactive and available at the time of the change. Also, synchronous changepropagation introduces substantial messaging and synchronization costsat the time of the original changes.

The means of detecting changes to be propagated asynchronously can beactive or passive. Active change detection isolates the changes, at thetime of the change, for later processing using database triggers or asimilar mechanism. Passive change detection exploits information fromthe database recovery log, where changes are recorded for otherpurposes, to deduce what rows, of which tables, were changed as well asboth the old and new values of changed columns.

In a typical database environment, there are varying levels of paralleltransactional processing, involving concurrent transactions that executeread write actions against database information. Fundamental to thenature of a data replication process is the choice of how to move, orderand apply that stream of parallel database event changes to a targetdatabase.

One conventional approach provides a certain degree of apply parallelismby grouping related tables into distinct sets and having each set oftables applied by a completely separate program. However, this approachplaces a heavy burden the user, who may have difficulty knowing whichtables are logically related and must be grouped together.

In another conventional approach, parallelism is provided but withoutpreserving the source data event order. Thus, to provide data integrity,a “shadow” table is used to track and maintain each individual data rowchange. This approach, however, has a significant overhead cost in bothmaking updates and in performing lookups against the shadow table.

Other conventional approaches provide parallelism but by using a veryproprietary way that has no or limited applicability outside of aspecific system.

Accordingly, there exists a need for an improved method for providingparallel apply in asynchronous data replication in a database system.The improved method and system should provide a high speed parallelapply of transactional changes to a target node such that the parallelnature of the application of changes does not compromise the integrityof the data. The improved method and system should also requiresignificantly less overhead than conventional approaches and be easilyadaptable to various types of database systems. The present inventionaddresses such a need.

SUMMARY OF THE INVENTION

A computer readable medium encoded with a computer program for handlingtransaction messages in asynchronous data replication in a databasesystem is disclosed. The computer program provides a high speed parallelapply of transactional changes to a target node such that the parallelnature of the application of changes does not compromise the integrityof the data. The computer program detects, tracks, and handlesdependencies between transaction messages to be applied to the targetnode. If a transaction message has a dependency on one or more precedingtransaction messages whose applications have not yet completed, thattransaction message is held until the application completes. Inaddition, the computer program requires significantly less overhead thanconventional approaches.

BRIEF DESCRIPTION OF THE FIGURES

FIG. 1 illustrates an embodiment of a system for providing parallelapply in asynchronous data replication in a database system inaccordance with the present invention.

FIG. 2 is a flowchart illustrating an embodiment of a method forproviding parallel apply in asynchronous data replication in a databasesystem in accordance with the present invention.

FIG. 3 is a flowchart illustrating in more detail the determining ofdependencies in the method for providing parallel apply in asynchronousdata replication in a database system in accordance with the presentinvention.

FIG. 4 illustrates an example of the method for providing parallel applyin asynchronous data replication in a database system in accordance withthe present invention.

DETAILED DESCRIPTION

The present invention relates to providing parallelized apply ofasynchronously replicated transactional changes to a target database.The following description is presented to enable one of ordinary skillin the art to make and use the invention and is provided in the contextof a patent application and its requirements. Various modifications tothe preferred embodiment will be readily apparent to those skilled inthe art and the generic principles herein may be applied to otherembodiments. Thus, the present invention is not intended to be limitedto the embodiment shown but is to be accorded the widest scopeconsistent with the principles and features described herein.

To more particularly describe the features of the present invention,please refer to FIGS. 1 through 4 in conjunction with the discussionbelow.

FIG. 1 illustrates an embodiment of a system for providing parallelapply in asynchronous data replication in a database system inaccordance with the present invention. The system includes a source node101 and a target node 106. At the source node 101 are one or more sourcetable copies 102, a recovery log 103, a Capture program 104 (“Capture”),and a send queue 105. At the target node 106 are a receive queue 107, anApply program (“Apply”) 108 and one or more target table copies 112.Apply 108 includes a browser thread 109, a work queue 110, a done queue111, and one or more agent threads 112. Capture 104 reads changes ofcommitted transactions from the recovery log 103 and sends them to Apply108 running on the target node 106. Apply 108 eventually re-executes thechanges of the transactions.

In this embodiment of the present invention, the tabular data at thesource table copies 102 whose changes are to be replicated to the targettable copies 113 reside in a Relational Database management System(RDBMS) such as the DB2™ RDBMS product offered by International BusinessMachines Corporation™. The RDBMS maintains a recovery log 103 and ameans to query its contents. The entries of the recovery log 103describe changes to rows of the source tables 102 at source node 101.More specifically, the entries in the recovery log 103 containinformation defining (1) the table being changed, (2) the value of thekey column in the row being changed, (3) the old and new values of allcolumns of the changed row, and (4) the transaction (unit of work)containing the change. Recovery log entries for inserted rows containonly new column values while recovery log entries for deleted rowscontain only old column values. Recovery log entries for updated rowscontain the new and old values of all row columns. The order of entriesin the recovery log reflect the order of change operations within eachtransaction and the order of transaction commit records reflects theorder in which transactions are completed. The format of a row changelog record can be abstracted as follows:

type transid tableId old key old non-key new key new non-key cols colscols cols

To control the propagation of changes to table copies, copy controltables (not shown) designating table copies and their target tablecopies are used by the replication system. The control informationincludes, but is not limited to: (1) the name of the copied table, (2) alist of the table copies' key columns, (3) filtering and projectioninformation, and (4) the message channels on which to send descriptionsof changes to the target table copies.

The list of key columns defined for a replication definition will behereafter referred to as the “replication key”. The replication keyshould not be confused with other attributes of source or target tablecopies which may use primary key columns or foreign key columns.However, it is possible that the primary key of a source or target tablecopy may be comprised of the same set of columns as are specified forthe replication key. The replication key uniquely identifies a rowentity in a target table copy so that it can be located by Apply, inapplying an update or delete change operation. Because the replicationkey uniquely identifies a row entity, it is used in the serialization ofchanges made to these unique row entities.

The type of row operation in change log records can be delete, insert,update, or key update. Updates that do not modify the replication key(update) are distinguished from updates that do modify the replicationkey (key update).

The changes made to table copies are determined by reading the recoverylog. Changes are saved in memory until a transaction commit record isseen on the recovery log. Only committed transactions at the source node101 are moved and applied to target nodes 106. Change records aregrouped into their originating source transaction units and written asone logical message unit. Because a logical transaction message can bequite large, it may be broken down into a plurality of physicalmessages. In this specification, a “transaction message” refers to alogical transaction message. Changes to be sent to the other tablecopies are sent via logical message units on the recoverable queues(e.g. send queue 105 and receive queue 107) designated in the copycontrol tables for the table copies of the log records.

The transactions messages are put on the recoverable queue in the sourcecommit order. Within each transaction, the change records are arrangedin the order in which they occurred within the source transaction. Inthis embodiment, there is no inherent parallelism in the movement of thecommitted transactional data. The queuing of the transactional data isserialized such that data is moved to the target node 106 in the sourcetransactional commit order.

In capturing the information for individual change records, the type ofchange operation for each change determines what replication key columnvalues will be sent as part of that change record. For insert and updatetypes of change records, the new replication key column values are sentas part of the change records within the transaction message. Bydefinition, an insert is a new record and therefore has no old values.By definition, the new replication key column values of an update typeof change record must be the same as the old replication key columnvalues. For delete type change records, there is by definition no newrecord, only an old record, and therefore the old replication key columnvalues are sent. For key update records, the old replication key columnvalues are sent in addition to the new replication key column values.

Returning to FIG. 1, for any given receive/recoverable queue 107 that ispopulated with transactions from a given source node 101 and is to beused as the source of changed data to be applied to a given target node106, Apply 108 has a browser thread 109 and one or more agent threads112, where the number of agents is determined through user input. Thework queue 110 and the done queue 111, structures internal to Apply 108,are created for the purpose of communication between the browser thread109 and the agent threads 112.

FIG. 2 is a flowchart illustrating an embodiment of a method forproviding parallel apply in asynchronous data replication in a databasesystem in accordance with the present invention. First, the browserthread 109 examines the next transaction message in the receive queue107, via step 201. The values of the replication key columns for eachrow change in the transaction message is remembered, via step 202. Inthis embodiment, information describing the transaction, including thevalues of the replication key columns, is remembered, i.e., stored in alogical data structure, and tracked. Other information concerning thetransaction can also be remembered. The logical data structure alsotracks any preceding non-completed transaction messages, including anysubsequent transaction messages that are dependent upon it.

Next, the browser thread 109 determines if the transaction message hasdependencies, via step 203. A transaction message has a dependency ifthe preservation of the integrity of the data requires that one or morepreceding non-completed transaction messages be applied prior to theapplication of the current transaction message. If the transactionmessage has dependencies, then the browser thread 109 checks thetransaction messages on the done queue 111 to see if the completion ofany of those transaction messages clears the dependencies, via step 204.If not, then non-completed transaction messages upon which thetransaction message is dependent are marked to indicate the transactionmessage's dependency, via step 205. The current transaction message isalso marked with its dependencies and held, via step 206, and notallowed to be applied. If it does not have any dependencies, then thetransaction message can be applied in parallel with the precedingtransaction(s) currently being applied, and is thus placed on the workqueue 110, via step 207. Once placed on the work queue 110, thetransaction message becomes eligible to be applied by any availableagent thread 112. The more agent threads 112 that are made available tobe used, the more transaction messages which are eligible forapplication can be applied in parallel.

Each of a plurality of agent threads 112 look on the work queue 110,each removes a transaction message from the work queue, via step 208.Each agent thread 112 then applies the row changes in the transactionmessage to the target table copies 113 in parallel with each other, viastep 209. All row changes from a transaction message are applied as atransaction unit, and are committed as a unit. In this embodiment,committed as part of this transaction is an update of a control table toindicate that this transaction has been successfully committed at thetarget table copy 113, via step 210. The update is an insert of an entryinto the control table for the completed transaction. When the logicaltransaction message comprises a plurality of physical transactionmessages, a plurality of entries, one for each physical transactionmessage, can be inserted. A control table in the same relationaldatabase as the target table copies 113 is used in order to provide forthe best performance of this transaction application, while at the sametime, keeping a permanent record of the successful application of thetransaction. The insert to the control table is important for messagecleanup of the receive queue 107, as described later in thisspecification.

In this embodiment, application of the changes is performed usinggenerated Structured Query Language (SQL) statements of anon-proprietary nature. These SQL statements may or may not be exactlythe same as the originating SQL statements made at the source node 101.However, the net effect of these changes is typically identical to thenet effect of the changes made by the originating SQL statements. Forexample, an originating SQL statement such as “DELETE FROM SOURCE.TABLE”could be made. This statement would have the effect of deleting all rowsfrom the table named SOURCE.TABLE. If there were five rows in the tableat this point in time, then there would be five rows deleted, and fivelog records would be generated on the recovery log. Each log recordwould indicate the delete operation of one of the five rows. From theinspection of the recovery log, the five operations would be used tocapture the information of five distinct data events, all of whichoccurred during a single transaction. This transaction would be queuedand moved to the target node 106, and the application of these changeswould be made as five distinct SQL statement, with SQL statement eachtargeting one of the individual rows of the corresponding target tablecopy. At the commit point of this applied transaction, the functionalequivalence point is then reached, such that the same five rows havebeen deleted from the corresponding source and target table copies.Thus, the method and system in accordance with the present invention isa non-proprietary implementation of Apply. It could be extended for usein any database that accepts standard SQL and has the general databaseproperty of atomicity.

Once the application is complete, the transaction message is placed onthe done queue 111, via step 211. The indicators of held transactionmessages dependent on this now completed transaction message, if anyexist, which were previously marked (via step 205) can now be checked,via step 212. These held transaction messages will be changed to removethe dependency or dependencies that existed regarding the now completedtransaction message, via step 213. After removal of these dependencies,each of the held transaction messages are checked to see if any otherdependencies remain, via step 214, against other preceding stillnon-completed transaction messages. Any held transaction message that isnow determined to be dependency free, via step 214, can be safelyapplied in parallel with the other transaction messages currently beingapplied, and thus placed on the work queue 110, via step 207. For heldtransaction messages with remaining dependencies, they remain as heldtransaction messages.

FIG. 3 is a flowchart illustrating in more detail the determining ofdependencies in the method for providing parallel apply in asynchronousdata replication in a database system in accordance with the presentinvention. For every transaction message that the browser thread 109examines, critical pieces of information regarding that transaction areassessed and tracked. For each row change that makes up the transactionmessage, information regarding the values of the replication key columnsis noted and tracked as part of that transaction. From the time of theinitial examination of a transaction by the browser thread 109 until theeventual placement of that transaction message on the done queue 111after successful application, the replication key column information forevery row change within this transaction message is used to assess newlyarriving transactions, to determine their eligibility for placement onthe work queue 110. If a newly assessed transaction message contains rowchanges with replication key column values that match the values of thereplication key columns from row change of any preceding transactionmessages that have not yet completed, then this newly assessedtransaction message is not eligible yet for application and must not yetbe placed on the work queue 110.

As illustrated in FIG. 3, the browser thread 109 examines a transactionmessage in the receive queue, via step 301. The transaction message cancontain a plurality of row changes. For each of the row changes, steps302 through 312 are performed. The browser thread 109 examines the nextchange in the transaction message, via step 302. If the type of changeis an insert or key update, via step 303, then the browser thread 109determines if the new replication key value of the insert or key updatechange is the same as the old replication key value of any precedingnon-completed transaction messages, via step 304. If they are the same,then the preceding non-completed transaction message is marked toindicate the transaction message's dependency, and the transactionmessage is marked to indicate the preceding non-completed transactionmessage upon which it depends, via step 305.

The new replication key column values of an insert or key update type ofrow change represent the introduction of a new row entity. Either ofthese row actions could have been preceded by a delete of that rowentity (carrying old replication key column values) or by a key updatewhich had the net effect of a delete followed by an insert, where itwould be the delete aspect of the prior row action that couldpotentially have commonality with this row action and is therefore ofinterest. Therefore, the new replication key column values of an insertor key update row change are compared to the old replication key columnvalues of all preceding non-completed transaction messages.

The method by which it is determined that a new or old replication keyvalue is the same as another new or old replication key value can berelaxed so long as the same replication key values are not determined tobe different. Those with ordinary skill in the art at the time of theinvention will recognize that the comparison of the result of anydeterministic function (e.g., a hash code function) can be used toinsure that identical replication key values are matched, whilediffering replication key values may be incorrectly matched. Theperformance benefits of simplified comparing can outweigh the loss ofparallelism due to incorrectly matched replication key values.

If the type of change is a delete or a key update, via step 306, thenthe browser thread 109 determines if the old replication key value ofthe delete or key update change is the same as the new replication keyvalue of any preceding non-completed transaction message, via step 307.If they are the same, then the preceding non-completed transactionmessage is marked to indicate the transaction message's dependency, andthe transaction message is marked to indicate the precedingnon-completed transaction message upon which it depends, via step 308.

The new replication key column values of an update type of row changerepresent the change of non-replication key column values of an existingrow entity. This row action could have been preceded by an insert ofthat row entity (carrying new replication key column values), or by akey update which had the net effect of a delete followed by an insert,where it would be the insert aspect of the prior row action that couldpotentially have commonality with this row action and is therefore ofinterest. Therefore, the new replication key column values of an updaterow change are compared to the new replication key column values of allpreceding non-completed transaction messages.

If the type of change is an update, via step 309, then the browserthread 109 determines if the new replication key value of the updatechange is the same as the new replication key value of any precedingnon-completed transaction message, via step 310. If they are the same,then the preceding non-completed transaction message is marked toindicate the transaction message's dependency, and the transactionmessage is marked to indicate the preceding non-completed transactionmessage upon which it depends, via step 311.

The old replication key column values of a delete or key update type ofrow change represent the deletion of an existing row entity. Either ofthese row actions could have been preceded by an insert of that rowentity (carrying new replication key column values), by an update ofthat row entity (carrying new replication key column values), or by akey update which had the net effect of a delete followed by an insert,where it would be the insert aspect of the prior row action that couldpotentially have commonality with this row action and is therefore ofinterest. Therefore, the old replication key column values of a deleteor key update row change are compared to the new replication key columnvalues of all preceding non-completed transaction messages.

Once the last change in a transaction message has been examined, viastep 312, and the transaction message is determined to havedependencies, via step 313, the process continues with step 204 (FIG.2). If the transaction message is determined to have no dependencies,then the process continues with step 207 (FIG. 2).

With the method in accordance with the present invention, whole sourcetransactions are executed as whole target transactions, and changes toany individual table row entity, as determined by the specified andrequired replication key column values, are serialized to the samedegree that those changes were serialized at the source database.Transactions with no dependencies are likely to be committed in adifferent order from the source commit order.

FIG. 4 illustrates an example of the method for providing parallel applyin asynchronous data replication in a database system in accordance withthe present invention. The transaction data found in the recovery log103 is grouped by transaction and those transactions are sent to thesend queue 105 in source commit order. For example, transaction 1 (Tx1),transaction 2 (Tx2), and transaction 3 (Tx3) were started in Tx1-Tx2-Tx3order, but were committed in Tx1-Tx3-Tx2 order. Thus, they are sent tothe receive queue 107 in committed Tx1-Tx3-Tx2 order.

When Tx1 arrives on the receive queue 107, the browser thread 109examines Tx1, via step 201. Information concerning Tx1 is remembered,via step 202. Such information includes the fact that Tx1 involves aninsert into table T1 of a row with replication key value=1. Since thereare no preceding transactions, Tx1 has no dependencies, via step 203.Tx1 is thus placed on the work queue, via step 207.

As Tx1 is removed from the work queue, via step 208, and being applied,via step 209, the browser thread 109 examines Tx3, via step 201.Information concerning Tx3 is remembered, via step 202. Such informationincludes the fact that Tx3 involves a delete from table T1 of a row withreplication key value=1 and an insert into table T1 a row withreplication key value=2. The browser thread 109 determines that Tx3 hasa dependency for table T1 delete, since the old replication key value ofthe delete (key=1) is the same as the new replication key value for theinsert in Tx1, via step 307. Assuming that Tx1 has not yet completed,there are no transaction messages on the done queue 111 so steps 204 and205 are not performed. Tx1 is thus marked to indicate the dependency ofTx3, and Tx3 is marked to indicate it is dependent upon Tx1, via step308. Tx3 is held, via step 206.

The browser thread 109 next examines Tx2 after it arrives on the receivequeue 107, via step 201. Information concerning Tx2 is remembered, viastep 202. Such information includes the fact that Tx2 involves an updatein table T2 of a row with replication key=1, and an update in table T2of a row with replication key=3. The browser thread 109 determines thatTx2 has no dependencies, via step 203 (and step 310), and places Tx2 onthe work queue 110, via step 207.

When application of Tx1 completes, via step 209, the control table isupdated to indicate its completion, via step 210. Tx1 is also placed onthe done queue 111, via step 211. From the marks added to Tx1 above, thebrowser thread 109 knows to remove from Tx3 its dependency upon Tx1. Thebrowser thread 109 then checks if Tx3 is now dependency free, via step212. Since Tx3 is now dependency free, it is placed on the work queue,via step 207.

In this embodiment, the receive queue 107 is a persistent queue, whilethe work queue 110 and the done queue 111 are not. The persistence ofthe receive queue 107 is to protect the integrity of the data in case ofa system failure or some other interruption during the transactionapplication process. However, the persistent nature of the receive queue107 requires that messages in the receive queue 107 be removed aftertransactional messages have been successfully applied. Otherwise, if theprocess is interrupted, the system upon restart will attempt to applythe changes in the transaction messages on the receive queue 107 again,leading to errors.

One possible method of removal is a two-phase commit approach, where thedelete of the message from the receive queue 107 is committed as part ofthe same transaction at the target node 106 that applies the changes.Another method is to use an asynchronous “cleanup” approach, asdescribed below. The asynchronous cleanup approach has the advantage ofdefraying the delay and overhead costs associated with the two-phasecommit approach.

In the asynchronous cleanup approach, it is noted that a control tableis updated and committed as part of the transaction that applies thechanges associated with a logical replication transaction message at atarget node 106. This allows for a background task to be executed on aperiodic basis which deletes messages from the receive queue 107 basedon the existence of an entry in the control table indicating that thismessage has been successfully applied. After the delete of one or morelogical transaction messages from the receive queue 107 has beencommitted, entries for the logical transmission message from the controltable can be safely removed. If the logical transaction messagecomprises a plurality of physical transaction message, then eachphysical transaction has its own entry in the control table. Each entryfor the physical messages is individually removed. This approach avoidsthe cost of a two-phase commit since the control table rows are deletedafter the committed delete of the messages on the receive queue 107. Ifentries in the control table exist without corresponding queue messagesbecause those messages have already been deleted due to some processinterruption, this poses no possible harm to the system, and such extracontrol table rows can be safely removed at anytime.

An improved method for providing parallel apply in asynchronous datareplication in a database system has been disclosed. The improved methodand system provides a high speed parallel apply of transactional changesto a target node such that the parallel nature of the application ofchanges does not compromise the integrity of the data. The method andsystem detects, tracks, and handles dependencies between transactionmessages to be applied to the target node. If a transaction message hasa dependency on one or more preceding transaction messages whoseapplications have not yet completed, that transaction message is helduntil the application completes. In addition, the method and systemrequires significantly less overhead than conventional approaches and iseasily adaptable to various types of database systems.

Although the present invention has been described in accordance with theembodiments shown, one of ordinary skill in the art will readilyrecognize that there could be variations to the embodiments and thosevariations would be within the spirit and scope of the presentinvention. Accordingly, many modifications may be made by one ofordinary skill in the art without departing from the spirit and scope ofthe appended claims.

1. A non-transitory computer readable medium encoded with a computerprogram for handling transaction messages in asynchronous datareplication in a database system, the database system including a sourcenode and a target node, each transaction message having informationconcerning at least one row change to a table copy at the source node,the computer program comprising executable instructions for: determiningwhether a first transaction message depends on a preceding non-completedtransaction message, the first transaction message depending on thepreceding non-completed transaction when a row change associated withthe-preceding non-completed transaction requires application to a tablecopy at the target node prior to a row change associated with the firsttransaction message; responsive to the first transaction messagedepending on the preceding non-completed transaction, holding the firsttransaction message; completing the preceding non-completed transactionmessage including applying the row change associated with tile precedingnon-completed transaction message to the table copy at the target node;and responsive to completing the preceding non-completed transactionmessage, releasing the first transaction message and applying the rowchange associated with the first transaction message to the table copyat the target node; and responsive to the first transaction message notdepending on the preceding non-completed transaction, applying the rowchange associated with the first transaction message to the table copyat the target node without holding the first transaction message,wherein determining whether the first transaction message depends on thepreceding non-completed transaction message comprises: determining thatthe row change in the first transaction message is an insert or a keyupdate type of change; comparing a new replication key value in the rowchange in the first transaction message to an old replication key valueof the row change in the preceding non-completed transaction message,including comparing a hash value of the new replication key value in therow change in the first transaction message to a hash value of the oldreplication key value in the row change in the preceding non-completedtransaction message; and determining that the first transaction messagedepends on the preceding. non-completed transaction message if the newreplication key value in the row change in the first transaction messageis the same as the old replication key value in the row change in thepreceding non-completed transaction message.
 2. The computer readablemedium of claim 1, wherein the computer program further comprisesexecutable instructions for: examining a plurality of transactionmessages on a work queue by a plurality of agent threads; applying inparallel row changes in each of the plurality of transaction messages byeach of the plurality of agent threads; updating a control table toindicate completion of the application of each of the plurality oftransaction messages; and placing each completed transaction message ona done queue.
 3. The computer readable medium of claim 2, wherein thecomputer program further comprises executable instructions for:examining each completed transaction message on the done queue;determining if completion of a completed transaction message clearsdependencies of any held transaction messages dependent upon thecompleted transaction message; and placing any of the held transactionmessages onto the work queue, if the dependencies of the heldtransaction message have been cleared.
 4. The computer readable mediumof claim 1, wherein the computer program further comprises executableinstructions for: removing the completed transaction message from areceive queue.
 5. The computer readable medium of claim 4, whereinremoving the completed transaction message from the receive queuecomprises: deleting the completed transaction message from the receivequeue as part of a two-phase commit synchronization with the applicationof the completed transaction message.
 6. The computer readable medium ofclaim 4, wherein removing the completed transaction message from thereceive queue comprises: obtaining at least one entry in a control tableat the target node indicating that the completed transaction message hasbeen completed; and deleting the completed transaction message from thereceive queue.
 7. The computer readable medium of claim 6, wherein thecomputer program further comprises executable instructions for: removingthe at least one entry from the control table.
 8. The computer readablemedium of claim 1, wherein determining whether the first transactionmessage depends on the preceding non-completed transaction messagefurther comprises: determining that the row change in the firsttransaction message is a delete or a key update type of change;comparing an old replication key value in the row change in the firsttransaction message to a new replication key value in a row change inthe preceding non-completed transaction message; and determining thatthe first transaction message depends on the preceding non-completedtransaction message if the old replication key value in the row changein the first transaction message is the same as the new replication keyvalue in the row change in the preceding non-completed transactionmessage.
 9. The computer readable medium of claim 8, wherein comparingan old replication key value in the row change in the first transactionmessage to a new replication key value in a row change in the precedingnon-completed transaction message comprises: comparing a hash value ofthe old replication key value in the row change in the first transactionmessage to a hash value of the new replication key value in the rowchange in the preceding non-completed transaction message.
 10. Thecomputer readable medium of claim 1, wherein determining whether thefirst transaction message depends on the preceding non-completedtransaction message further comprises: determining that the row changein the first transaction message is an update type of change; comparinga new replication key value in the row change in the first transactionmessage to a new replication key value in a row change in the precedingnon-completed transaction message; and determining that the firsttransaction message depends on the preceding non-completed transactionmessage if the new replication key value in the row change in the firsttransaction message is the same as the new replication key value in therow change in the preceding non-completed transaction message.
 11. Thecomputer readable medium of claim 10, wherein comparing a newreplication key value in the row change in the first transaction messageto a new replication key value in a row change in the precedingnon-completed transaction message comprises: comparing a hash value ofthe new replication key value in the row change in the first transactionmessage to a hash value of the new replication key value in the rowchange in the preceding non-completed transaction message.